package com.loyal.loyalerp.humenresource.askleave.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.loyal.loyalerp.humenresource.askleave.model.AskLeave;
@Mapper
public interface AskLeaveMapper {
	
	//根据月份查找该月请假表是否被审核
	@Select("select * from rs_qingjiaapply WHERE KjYear=#{kjYear} AND Period=#{period}")
	List<AskLeave> selectAskByKjYearAndPeriod(AskLeave ask);
	
	List<AskLeave> selectPersonQinJiaByPersonId(int id);
	
	//根据员工的手机号获得员工所有的请假信息
	List<AskLeave> selectPersonQinJiaByPhone(String phone);
	
    int deleteByPrimaryKey(Integer id);

    int insert(AskLeave record);

    int insertSelective(AskLeave record);

    AskLeave selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AskLeave record);

    int updateByPrimaryKey(AskLeave record);
    
    void deleteApplyById(int id);
    
    List<AskLeave> selectAll();
    List<AskLeave> selectAllCheck();
    List<AskLeave> selectAllCheckAndTime(String a,String b,String personId);
    List<AskLeave> selectAllNotCheck();
    List<AskLeave> selectAllNotCheckAndTime(String a,String b,String personId);
    List<AskLeave> selectCurrentUserAskLeave(Integer id);
    List<AskLeave> selectCurrentUserAskLeaveInput();
    
    int selectKaoQinMonthHasExist(Integer year,Integer month,Integer id);

}